package com.tanhua.dubbo.api;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.itheima.model.pojo.Dimension;
import com.tanhua.dubbo.mapper.DimensionMapper;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class DimensionApiImpl implements DimensionApi{

    @Autowired
    private DimensionMapper dimensionMapper;

    @Override
    public List<Dimension> findByCharacterId(Long id) {
        return dimensionMapper.selectList(Wrappers.lambdaQuery(Dimension.class)
                .eq(Dimension::getCharacterId, id));
    }
}
